/*
 * @Description: 审核中 AuditInProgress
 * @version: 
 * @Company: 
 * @Author: ZhengZhuang
 * @Date: 2019-08-24 16:42:38
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-03-29 10:25:17
 */
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:url_launcher/url_launcher.dart';

class AuditInProgress extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("审核中"),
        elevation: 0,
      ),
      body: Container(
        color: Color(0xffFFFFFF),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          children: <Widget>[
            SizedBox(
              height: ScreenUtil().setWidth(80.0),
            ),
            Center(
              child: Image.asset(
                'assets/icon/carImageIcon.png',
                width: ScreenUtil().setWidth(190.0),
                height: ScreenUtil().setWidth(190.0),
              ),
            ),
            SizedBox(
              height: ScreenUtil().setWidth(56.0),
            ),
            Container(
              width: ScreenUtil().setWidth(690.0),
              alignment: Alignment.center,
              child: Text(
                '感谢您申请C20出行车主',
                style: TextStyle(
                  fontSize: ScreenUtil().setSp(32.0),
                  color: Colors.black,
                  fontWeight: FontWeight.w500,
                ),
              ),
            ),
            SizedBox(
              height: ScreenUtil().setWidth(32.0),
            ),
            _textWidget('您的资料正在审核中，审核通过后会有消息通知', 30.0, Color(0xff999999)),
            SizedBox(
              height: ScreenUtil().setWidth(10.0),
            ),
            _textWidget('如有任何疑问，可拨打客服电话联系', 30.0, Color(0xff999999)),
            SizedBox(
              height: ScreenUtil().setWidth(60.0),
            ),
            _textWidget('客服热线', 30.0, Colors.black87),
            InkWell(
              child: _textWidget(
                  '400-089-3089', 36.0, Color.fromARGB(255, 51, 153, 255)),
              onTap: () => _makePhoneCall('tel:${4000893089}'),
            ),
          ],
        ),
      ),
    );
  }

  Widget _textWidget(title, size, colorStyle) {
    return Container(
      width: ScreenUtil().setWidth(690.0),
      alignment: Alignment.center,
      child: Text(
        title,
        style: TextStyle(
          fontSize: ScreenUtil().setSp(size),
          color: colorStyle,
        ),
      ),
    );
  }

  _makePhoneCall(url) async {
    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
  }
}
